<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="master.xhtml/master">
  <body>
    <h2 metal:fill-slot="heading">Tuoteselosteet</h2>
    <div metal:fill-slot="main" tal:omit-tag="">
      <p>
        Tältä sivulta saat lisätietoa tilattavissa olevista tuotteista joko <a tal:attributes="href string:${base}?view=ingredients&mode=product">aakkosjärjestyksessä</a> tai <a tal:attributes="href string:${base}?view=ingredients&mode=producer">tuottajien mukaan järjestettynä</a>.
      </p>
      <dl class="ruokapiiri-ingredients" tal:condition="php:mode=='product'">
        <tal:product repeat="product products">
          <tal:visible condition="product/description">
            <dt tal:attributes="id product/id"><span tal:replace="product/description">Tuote</span>
              <em tal:condition="product/producer"
                  tal:content="string: (${product/producer})">(Tuottaja)</em>
            </dt>
            <dd>
              <tal:lines repeat="line product/ingredients">
                <tal:line replace="line">Ainesosat</tal:line><br tal:condition="not:repeat/line/end" />
              </tal:lines>
            </dd>
          </tal:visible>
        </tal:product>
      </dl>
      <tal:producers condition="php:mode=='producer'"
                     repeat="producer producers">
        <h3 tal:content="producer/name">Tuottaja</h3>
        <dl class="ruokapiiri-ingredients">
          <tal:product repeat="product producer/products">
            <dt tal:attributes="id product/id" tal:content="product/description">Tuote</dt>
            <dd>
              <tal:lines repeat="line product/ingredients">
                <tal:line replace="line">Ainesosat</tal:line><br tal:condition="not:repeat/line/end" />
              </tal:lines>
            </dd>
          </tal:product>
        </dl>
      </tal:producers>
      <tal:other condition="php:mode=='producer' and count(other)">
        <h3>Muut</h3>
        <dl class="ruokapiiri-ingredients">
          <tal:product repeat="product other">
            <dt tal:attributes="id product/id" tal:content="product/description">Tuote</dt>
            <dd>
              <tal:lines repeat="line product/ingredients">
                <tal:line replace="line">Ainesosat</tal:line><br tal:condition="not:repeat/line/end" />
              </tal:lines>
            </dd>
          </tal:product>
        </dl>
      </tal:other>
    </div>
  </body>
</html>